<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    var arr = [40, 48, 53, 44, 71, 41];
    var str = []; //存放偶数的变量
    for (var i = 0; i < a.length; i++) {
      // 获取偶数-
      if (arr[i] % 2 == 0) {
        str.push(a[i]);
      }
    }
    console.log(Math.max(...str));
  </script>
</body>

</html>